#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
void FindNum(int arr[10], int n, int* pnum1, int* pnum2)
{
	int tmp = 0;
	int i = 0;
	for (i = 0; i < n; i++)
	{
		tmp ^= arr[i];
	}
	int k = 0;
	for (i = 0;i < 32; i++)
	{
		if (((tmp) >> i) & 1 !=0)
		{
			k = i;
			break;
		}
	}
	*pnum1 = *pnum2 = 0;

	for (int i = 0; i < n;i++)
	{
		if (((arr[i] >> k) & 1) != 0)
		{
			*pnum1 ^= arr[i];

		}
		else
		{
			*pnum2 ^= arr[i];

		}
	}
	
}
int main()
{
	int num1 = 0;
	int num2 = 0;
	int arr[] = { 1,2,3,4,5,1,2,3,4,6 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	FindNum(arr, sz, &num1, &num2);
	printf("%d %d", num1, num2);
}